<?php
namespace App\Services\Main;

use App\Repositories\Main\ComCostRepository;
use App\Repositories\Main\ComCostTypeRepository;

class ComCostService
{
    private $service;
    private $type;

    public function __construct()
    {
        $this->service = new ComCostRepository();
        $this->type = new ComCostTypeRepository();
    }

//    public function getIndex($orderId)
//    {
//        return $this->service->setAdd($data);
//    }

    public function add($data)
    {
        return $this->service->setAdd($data);
    }

    public function modify($data,$id)
    {
        return $this->service->setModify($data,$id);
    }

    public function getOne($id)
    {
        return $this->service->getShowOne($id);
    }

    public function setType($uid,$typeName)
    {
        $model = $this->type->getShowByName($uid,$typeName);
        if (!$model) {
        }
    }
}